define(function (require, exports, module) {
    var sTpl = require("modules/cube-props/index.html");



    var vueComponent = Vue.extend({
        template: sTpl,
        props: ["curCubeId"],
        data: function () {
            return {
                tableData: []
            }
        },
        methods: {
            handleEditClick: function (row) {
                var config = {
                    url: '02-componentEdit.html#/cube-collection/cubeId=1001',
                    menuName: row.cnName + '-编辑'
                };
                this.openWin(config);
            },
            toggleHasTop: function (to) {
                if (to == undefined) {
                    this.innerPage.hasTop = !this.innerPage.hasTop;
                } else {
                    this.innerPage.hasTop = to;
                }
            },
        },
        created: function () {
            //this.curCubeId = parseInt(this.$route.params.curCubeId) || 0;
            var map = require("config/api.js");
            var allData = map["cube_props"] || {};

            if (this.curCubeId.toString().indexOf('11') > -1) {
                this.tableData = allData['1101_1102_1103_1104_1105'];
            } else {
                this.tableData = allData[this.curCubeId];
            }

        }
    });


    Vue.component('m-cube-props', vueComponent); //都全局注册 同时exports

    module.exports = vueComponent;
});